public class Main {
    public static void main(String[] args) {
        //0 1 1 2 3 5 8 13 21 34
        System.out.println(fib(5));//3
    }
    public static int fib(int n){
        if(n == 1){
            return 0;
        }
        if(n == 2){
            return 1;
        }
        return fib(n-1)+fib(n-2);
    }
}